package com.newlink.building.main.mvp.contract

import com.newlink.building.common_base.base.IModel
import com.newlink.building.common_base.base.IPresenter
import com.newlink.building.common_base.base.IView
import com.newlink.building.common_base.model.bean.*
import io.reactivex.Observable

/**
 * Created by xiaodong on 2022/9/26.
 */
class Module_Main_ResidentContract {
    interface View : IView {
        fun getUnitListSuccess(data: MutableList<UnitData>)
        fun getRoomListSuccess(data: MutableList<RoomData>)
        fun getPropertyUserListSuccess(data: MutableList<PropertyManagerData>)
    }

    interface Presenter : IPresenter<View> {
        fun getUnitList(token: String, prjId: String, name: String)
        fun getRoomList(token: String, unitId: String, roomName: String)
        fun getPropertyUserList(token: String, prjId: String, name: String)
//        fun getCategoryData(token: String)
//        fun getDoorInfo(token: String, mac: String)
//        fun openDoorAction(request: OpenDoorRequest)
    }

    interface Model : IModel {
        fun getUnitList(
            token: String,
            prjId: String,
            name: String
        ): Observable<HttpResult<MutableList<UnitData>>>

        fun getRoomList(
            token: String,
            unitId: String,
            roomName: String
        ): Observable<HttpResult<MutableList<RoomData>>>

        fun getPropertyUserList(
            token: String,
            prjId: String,
            name: String
        ): Observable<HttpResult<MutableList<PropertyManagerData>>>
    }
}